<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'zhiWeiSheZhi.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="qiang/zgq/js/jquery-1.8.3.js"></script>

	<link rel="stylesheet" href="qiang/zgq/css/cal.css"  type="text/css" />
	<script src="qiang/zgq/js/cal.js" type="text/javascript" charset="gbk"></script>
	<script type="text/javascript">
		$(function(){
			$("table tr:odd").css("background-color","#FFFFFF");
			$("[type='button']").click(function(){
				window.location.href="findAllDept?buMenTiaoZhuan=0";
			});
			$(".checkbox").click(function(){
				alert("123");
				var id = $(this).parent().next().html();
				alert(id);
			});
			
			
			
		});
	</script>
	<style type="text/css">
		#page li{float: left;padding-left: 5px;}
	</style>
  </head>
  
  <body>
	<div id=all
		style="width:1050px ;height: 2000px;background-color: #C9C9C9;margin: 0 auto;position:relative;top:30px;">
		
		<div id="header"
			style="width: 1030px; height:100px;position:absolute;left: 10px;top:0px;background-color:white;">
			<%@ include file="header.jsp"%>
		</div>
		<div id="left"
			style="height: 1000px;width: 200px; position:absolute;left: 10px;top:100px;background-color:white;">
			<%@ include file="left_use.jsp"%>
		</div>
		
		<div id="right"
			style="height: 1000px;width: 810px; ;position:absolute;left: 230px;top:100px;
			background-color:#F4F4F4;">
			<div id="h11" style="width:782px;">
			
			<form action="findZhiWeiByCondition" method="post">
		<div id="d1">
        	<span>系统设置 >> 职位设置</span>
        </div>
    	<div id="d2">
        	<span>职位名称：</span><input type="text" name="name" value="${name}"/>
            <span>所属部门：</span>
            	<select name="deptId">
                	<option value="0">--请选择--</option>
                	<c:forEach items="${lisDepts}" var="l">
                		<option <c:if test="${l.id==deptId}">selected</c:if> value="${l.id}">${l.dname}</option>
                	</c:forEach>
                </select>
            <span>是否启用：</span>
           		<select name="status">
                	<option value="">--请选择--</option>
                    <option <c:if test="${status=='是'}">selected</c:if> value="是">是</option>
                    <option <c:if test="${status=='否'}">selected</c:if> value="否">否</option>
                </select>
            <input type="submit" value="查询" />
        </div>
		<div id="d3">
        	<input type="button" value="新增职位" />
        </div>
        <div id="d4">
       	  <table  width="750px" border="1" cellspacing="0" cellpadding="0" >
            	<tr>
            		<td>职位编码</td>
                	<td>职位名称</td>
                	<td>职位分类</td>
                	<td>所属部门</td>
                	<td>是否启用</td>
                	<td>操作</td>
                </tr>
                <c:forEach items="${listzwZhiweibiaos}" var="i">
	                <tr>
	            		<td>${i.code}</td>
	                	<td>${i.name}</td>
	                	<td>${i.classify}</td>
	                	<td>${i.dept.dname}</td>
	                	<td><input type="checkbox" name="checkbox" value="checkbox" />
	                		</td>
	                	<td><a href="findZhiWeiById?mingXi=0&id=${i.id}">修改</a>
	                	<a href="findZhiWeiById?mingXi=1&id=${i.id}">明细</a>
	                	<a href="delZhiWei?id=${i.id}">删除</a></td>
	                </tr>
	           </c:forEach>     
            </table>
        	<div style="width: 300px;margin-left: 240px;margin-top: 10px;">
                    	<script type="text/javascript">
                    		$(function(){
                    			$("#page").click(function(){
                    				//alert($("#hid").val());
                    			});
                    			$("#sele").click(function(){
                    				//alert("123");
                    			});
                    			
                    			$("#xinZeng").click(function(){
                    				window.location.href="findAllJueSe";
                    			});
                    		});
                    	</script>
                    	<input type="hidden" value="${page}" id="hid"/>
						<ul id="page">
						    <li><a href="findZhiWeiByCondition?page=${page-1}">&laquo;</a></li>
						    <li><a href="findZhiWeiByCondition?page=1">1</a></li>
						    <li><a href="findZhiWeiByCondition?page=2">2</a></li>
						    <li><a href="findZhiWeiByCondition?page=3">3</a></li>
						    <li><a href="findZhiWeiByCondition?page=4">4</a></li>
						    <li><a href="findZhiWeiByCondition?page=5">5</a></li>
						    <li><a href="findZhiWeiByCondition?page=6">6</a></li>
						    <li><a href="findZhiWeiByCondition?page=7">7</a></li>
						    <li><a href="findZhiWeiByCondition?page=8">8</a></li>
						    <li><a href="findZhiWeiByCondition?page=9">9</a></li>
						    <li><a href="findZhiWeiByCondition?page=10">10</a></li>
						    <li><a href="findZhiWeiByCondition?page=${page+1}">&raquo;</a></li>
						    <li><input type="text" value="" id="go" size="2" style="height: 20px;"/></li>
						    <li><input type="button" value="Go" onclick="backGo()"/></li>
						</ul>
						
                    </div>
                    <script type="text/javascript">
                    		function backGo(){
                    		var id=$("#go").val();
                    		window.location.href="findZhiWeiByCondition?page="+id;
                    	};
                    </script>
                <div style="width: 200px;margin-left: 260px;margin-top: 10px;">
					<h1>${message}</h1>
				</div>   
        </div>
        </form>
			
				
		</div>
		
		</div>
	</div>
  </body>
</html>
